|
|
|
|
|
|
|
Figure 14.22
A Bezier surface (bold lines) with its
control points (dots) and control grid (thin lines). |
|
|
|
|
|
|
|
|
The Bi,M equations are called the curve's blending functions because they blend different amounts of the coordinates of the control points as u and v take values between 0.0 and 1.0. The blending functions work much as they do for the two-dimensional Bezier curves described in Chapter 11, Drawing Curves. |
|
|
|
|
|
|
|
|
Figure 14.22 shows a three-by-three control grid, so for that surface, M = 2 and N = 2. Consider what happens when u = 0 and v = 0. In that case the value of Bi,M(u) when u = 0 is: |
|
|
|
 |
|
|
|
|
Bi,2(0) = 2! / i! / (2 i)! * 0i * (1 0)2-i = 2! / i! / (2 i)! * 0i |
|
|
|
|
|
|
|
|
Because the value of 00 is defined as 1, but 0i = 0 for i > 0, all of the Bi,M terms have value zero except when i = 0. When i = 0, this equation becomes |
|
|
|
 |
|
|
|
|
B0,2(0) = 2! / 0! / (2 0)! * 00 = 2! / 1 / 2! * 1 = 1 |
|
|
|
|
|
|
|
|
Similarly, when v = 0, the value of Bj,N(v) is zero, unless j = 0, in which case Bj,N(v) = 1. That means every term in the summation has value zero except the first term where i = j = 0. Then the value for the X coordinate of the surface when u = v = 0 is: |
|
|
|
 |
|
|
|
|
X(0, 0) = ControlX(0,0) * 1 * 1 = ControlX(0,0) |
|
|
|
|
|